package com.jyw.system.domain.dto;

import com.jyw.common.core.domain.entity.SysDept;
import com.jyw.common.utils.bean.BeanUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 沈峻
 * @ClassName DeptAddDto
 * @Description TODO
 * @Date 2023/8/10 10:35
 **/
@ApiModel("新增科室请求实体")
@Data
public class DeptAddDto {

    /** 父部门ID */
    @ApiModelProperty("上级科室")
    private Long parentId;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("显示排序")
    private Integer orderNum;

    @ApiModelProperty("部门状态 0正常,1停用")
    private String status;

    public SysDept buildDept() {
        SysDept dept = new SysDept();
        BeanUtils.copyProperties(this,dept);
        dept.setDeptType(0);
        return dept;
    }

    public SysDept buildThird() {
        SysDept dept = new SysDept();
        BeanUtils.copyProperties(this,dept);
        dept.setDeptType(1);
        return dept;
    }
}
